        <#list ctrl.getAllPSPanelItems() as panelitem>
        <#if panelitem.getPSPanelItemGroupLogic('ITEMBLANK')??>
        <#assign ITEMBLANK = panelitem.getPSPanelItemGroupLogic('ITEMBLANK')/>
        if (Object.is(name, '')<#if ITEMBLANK.getRelatedItemNames()??><#list ITEMBLANK.getRelatedItemNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
            let ret = true;
            <#if ITEMBLANK.getRelatedItemNames()??>
            <#list ITEMBLANK.getRelatedItemNames() as detailName>
            const _${detailName} = this.data.${detailName};
            </#list>
            </#if>
            if (${P.getPartCode(ITEMBLANK, 'DETAIL_LOGIC').code}) {
                ret = false;
            }
            this.rules.${panelitem.name}.some((rule: any) => {
                if (rule.hasOwnProperty('required')) {
                    rule.required = ret;
                }
                return false;
            });
        }
        </#if>
        <#if panelitem.getPSPanelItemGroupLogic('ITEMENABLE')??>
        <#assign ITEMENABLE = panelitem.getPSPanelItemGroupLogic('ITEMENABLE')/>
        if (Object.is(name, '')<#if ITEMENABLE.getRelatedItemNames()??><#list ITEMENABLE.getRelatedItemNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
            let ret = false;
            <#if ITEMENABLE.getRelatedItemNames()??>
            <#list ITEMENABLE.getRelatedItemNames() as detailName>
            const _${detailName} = this.data.${detailName};
            </#list>
            </#if>
            if (${P.getPartCode(ITEMENABLE, 'DETAIL_LOGIC').code}) {
                ret = true;
            }
            this.detailsModel.${panelitem.name}.setDisabled(!ret);
        }
        </#if>
        <#if panelitem.getPSPanelItemGroupLogic('PANELVISIBLE')??>
        <#assign PANELVISIBLE = panelitem.getPSPanelItemGroupLogic('PANELVISIBLE')/>
        if (Object.is(name, '')<#if PANELVISIBLE.getRelatedItemNames()??><#list PANELVISIBLE.getRelatedItemNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
            let ret = false;
            <#if PANELVISIBLE.getRelatedItemNames()??>
            <#list PANELVISIBLE.getRelatedItemNames() as detailName>
            const _${detailName} = this.data.${detailName};
            </#list>
            </#if>
            if (${P.getPartCode(PANELVISIBLE, 'DETAIL_LOGIC').code}) {
                ret = true;
            }
            this.detailsModel.${panelitem.name}.setVisible(ret);
        }
        </#if>
        </#list>